
 <script language="javascript">
	function goback(){
		document.forms[0].action='<?=site_url("misc/homepage")?>';
		document.forms[0].submit();
	}
	function goaddnewcategory(){
		document.forms[0].action='<?=site_url("job_management/goto_addnew_category")?>';
		document.forms[0].submit();
	}
	function deletetitle(deleteid){
		if(confirm("Do you want to delete this category?","Delete category")){
			document.forms[0].action='<?=site_url("job_management/delete_category")?>/'+ deleteid ;
			document.forms[0].submit();
		}
	}
</script>
	<h3 class="capture">Job Management</h3>
    <div id="wrap">
    <div id="tdd_selected">
    	<div class="dd_selected">Category View</div>
        <div class="dd_view"><br />
        <form action="" method="post">
        	<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="userview">
        		<tr>
        			<th>Category Id</th>
        			<th>Category Description</th>
        			<th>Delete</th>
        		</tr>
        		 
        		<?php foreach($all_cate->result() as $category): ?>
                  <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
                    <td><a href="<?=site_url("job_management/goto_update_category/$category->cate_id");?>"><?=htmlspecialchars($category->cate_id);?></a></td>
                   	<td><?=htmlspecialchars($category->cate_desc);?></td>
                    <td align="center"><img src="<?=base_url();?>images/recyclebin.png" width="20px" height="20px" onclick="deletetitle('<?=$category->cate_id;?>')" /></td>
                  </tr>
              	<?php endforeach; ?>
            </table><br />
	<div id="pagesize" align="center"><?php echo $this->pagination->create_links(); ?></div><br />
           <div align="center">
	           <input type="button" name="btnback" value="Back" class="bottom" onclick="goback()" />
	           <input type="button" name="btnaddnew" class="bottom" value="Add New" onclick="goaddnewcategory()" />
	       </div><br />
        </form>
		</div>
        
    </div> 
      
  </div>


